package com.songlanyun.modules.recommendassist.model.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.songlanyun.common.drive.ValueObject;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 推荐帮扶
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-06 09:24:43
 */
@Data
public class RecommendAssistVO implements Serializable, ValueObject {

    /**
     * 真实姓名
     */
    @Excel(name = "真实姓名", orderNum = "1", width = 20)
    private String realName;
    /**
     * 联系电话
     */
    @Excel(name = "联系电话", orderNum = "2", width = 20)
    private String phone;
    /**
     * 性别（0：男 1：女）
     */
    @Excel(name = "性别", orderNum = "3", width = 8)
    private String sex;
    /**
     * 年龄
     */
    @Excel(name = "年龄", orderNum = "4", width = 8)
    private String age;
    /**
     * 身份证号
     */
    @Excel(name = "身份证号", orderNum = "5", width = 30)
    private String idNumber;
    /**
     * 所在地区
     */
    @Excel(name = "所在地区", orderNum = "6", width = 30)
    private String area;

    public String getArea() {
        if (StringUtils.isBlank(provinceName) && StringUtils.isBlank(cityName) && StringUtils.isBlank(areaName)) {
            return "- -";
        }
        StringBuilder builder = new StringBuilder();
        if (StringUtils.isNotBlank(provinceName)) {
            builder.append(provinceName);
        }
        if (StringUtils.isNotBlank(cityName)) {
            builder.append(cityName);
        }
        if (StringUtils.isNotBlank(areaName)) {
            builder.append(areaName);
        }
        return builder.toString();
    }

    /**
     * 省名
     */
    private String provinceName;
    /**
     * 市名
     */
    private String cityName;
    /**
     * 区名
     */
    private String areaName;

    /**
     * 详细地址
     */
    @Excel(name = "详细地址", orderNum = "7", width = 30)
    private String address;
    /**
     * 情况说明
     */
    @Excel(name = "申请原由", orderNum = "8", width = 30)
    private String explanation;
    /**
     * 联系人
     */
    private String contacts;
    /**
     * 联系电话
     */
    private String contactNumber;
    /**
     * 推荐时间
     */
    @Excel(name = "推荐时间", orderNum = "9", format = "yyyy-MM-dd HH:mm:ss", width = 30)
    private Date createTime;
    /**
     * 状态（0：待联系 1：已联系）
     */
    @Excel(name = "状态", orderNum = "10", width = 10)
    private String status;
    /**
     * 反馈结果
     */
    private String feedback;

    /**
     * 推荐人姓名
     */
    @Excel(name = "推荐人姓名", orderNum = "11", width = 15)
    private String recommendName;
    /**
     * 推荐人手机号
     */
    @Excel(name = "推荐人手机号", orderNum = "12", width = 15)
    private String recommendMobile;
}
